package com.d3works.csv.script;

import com.d3works.apps.base.db.Address;
import com.d3works.apps.base.service.AddressService;
import com.google.inject.Inject;
import java.util.Map;

public class ImportAddress {

  @Inject protected AddressService addressService;

  public Object importAddress(Object bean, Map<String, Object> values) {

    Address address = (Address) bean;
    address.setFullName(addressService.computeFullName(address));
    address.setZip(addressService.getZipCode(address));

    return address;
  }
}
